Skip to content

Add protocol version auto-update workflow - #978

Open
leighmcculloch wants to merge 24 commits into
mainfrom
auto-update-protocol-version
Open

Add protocol version auto-update workflow#978
leighmcculloch wants to merge 24 commits into
mainfrom
auto-update-protocol-version

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Aug 26, 2026

Copy link
Copy Markdown
Member

What

A daily workflow that sets each image's protocol_version_default to the highest protocol supported by all of its xdr, core, rpc, and horizon components — read from each component's source at the resolved commit — and opens an auto-merging PR when the value changes.

Why

Maintainers had to keep protocol_version_default in sync with the components' max supported protocol by hand, which is error-prone and drifts out of date (#860).

Close #860

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Aug 26, 2026
@leighmcculloch
leighmcculloch marked this pull request as ready for review August 26, 2026 13:20
Copilot AI balanced review requested due to automatic review settings August 26, 2026 13:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds daily automation to calculate and update each image’s default protocol version from resolved component sources.

Changes:

  • Adds protocol-version extraction and update logic.
  • Adds a scheduled workflow that opens auto-merging update PRs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.scripts/auto-update-protocol-version Calculates protocol defaults from component sources.
.github/workflows/auto-update-protocol-version.yml Runs updates daily and creates PRs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .scripts/auto-update-protocol-version
Comment thread .scripts/auto-update-protocol-version Outdated
Comment on lines +140 to +141
majors = [int(m) for m in re.findall(r"core_deb_version:\s*['\"]?(\d+)", text)]
return max(majors, default=None)
Comment thread .scripts/auto-update-protocol-version Outdated
Comment on lines +80 to +86
if not dep:
print(f"{tag}: skipping, no '{name}' dep")
return False
version = extract(dep)
if version is None:
print(f"{tag}: skipping, could not read protocol version from {name} ({dep['repo']}@{dep['ref']})")
return False
@leighmcculloch
leighmcculloch requested a review from a team August 26, 2026 14:00

on:
schedule:
- cron: '30 1 * * *' # 5:30 PM Pacific

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wouldn't be true depending on PDT/PST, but meh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

Fallback to Stellar Core's supported protocol version when config.protocol_version_default is not set

3 participants